<% for column in Purchase.content_columns %>
<p>
  <b><%= column.human_name %>:</b> <%=h @purchase.send(column.name) %>
</p>
<% end %>
<table>
  <tbody>
      <th><td>Id</td><td>Quantity</td></th>
    <% for item in @purchase.purchase_items %>
      <tr><td><%=h item.id %></td><td><%=h item.quantity %></td></tr> 
    <% end %>
  </tbody>
</table>

<%= link_to 'Edit', :action => 'edit', :id => @purchase %> |
<%= link_to 'Back', :action => 'list' %>
